package edu.hawaii.solardecathlon.page.media;

import java.util.Map;
import org.apache.wicket.ResourceReference;
import org.apache.wicket.markup.html.form.Button;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.image.Image;
import org.apache.wicket.model.PropertyModel;
import edu.hawaii.solardecathlon.page.BasePage;
import edu.hawaii.solardecathlon.page.light.LightingPage;

/**
 * The media page which allows the user to control the house's speaker function and more.
 * 
 * @author Jerry Lau
 */
public class MediaPage extends BasePage {

  /** Support serialization. */
  private static final long serialVersionUID = 1L;
  
  /**
   * The media page for this application.  
   */
  public MediaPage() {
    Map<String, String> props = getSessionProperties("media");
    
    Form<String> media = new Form<String>("media_page");
    media.add(new TextField<String>("room_one", new PropertyModel<String>(props, "room_one"))
      .setType(String.class));
    
    ResourceReference iconVolume = new ResourceReference(MediaPage.class, "icon_volume.png");
    add(new Image("icon_volume", iconVolume));
    
    ResourceReference fullBar = new ResourceReference(LightingPage.class, "fullbar.png");
    add(new Image("full_bar", fullBar));
    
    ResourceReference emptyBar = new ResourceReference(LightingPage.class, "emptybar.png");
    add(new Image("empty_bar", emptyBar));
    
    add(new Button("on"));
    add(new Button("off"));
  }
}
